﻿<phone:PhoneApplicationPage 
    x:Class="OdcTest.Views.JumpListPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ctrls="clr-namespace:Odyssey.Controls;assembly=Odyssey"
    xmlns:bh="clr-namespace:Odyssey.Behaviors;assembly=Odyssey"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:OdcTest.ViewModels"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480" bh:TiltEffect.IsTiltEnabled="True"
    shell:SystemTray.IsVisible="False">

    <phone:PhoneApplicationPage.DataContext>
        <vm:JumpListViewModel/>
    </phone:PhoneApplicationPage.DataContext>

    <Grid x:Name="LayoutRoot" Background="Transparent"  >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="ODYSSEY" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="jump list" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <ctrls:OdcListBox ItemsSource="{Binding Items}"  QuickJumpMode="Alphabetical">
                <ctrls:OdcListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid  HorizontalAlignment="Stretch" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle Fill="{StaticResource PhoneChromeBrush}" Width="72" Height="72" VerticalAlignment="Center" Margin="8,4"/>
                            <TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="48" VerticalAlignment="Center" Margin="15,4,5,4"/>
                            <!--<TextBox Grid.Column="1" Text="{Binding Title}" Margin="15,4,5,4" VerticalAlignment="Center" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"/>-->
                        </Grid>
                    </DataTemplate>
                </ctrls:OdcListBox.ItemTemplate>
                <ctrls:OdcListBox.HeaderTemplate>
                    <DataTemplate>
                        <Border Background="{StaticResource PhoneAccentBrush}" Width="72" Height="72" VerticalAlignment="Center" Margin="8,4" HorizontalAlignment="Left">
                            <TextBlock Text="{Binding Title}" VerticalAlignment="Center" FontSize="32" Margin="5,0" Foreground="White"/>
                        </Border>
                    </DataTemplate>
                </ctrls:OdcListBox.HeaderTemplate>
            </ctrls:OdcListBox>
        </Grid>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="False" IsMenuEnabled="False">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.check.rest.png" Text="OK"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.cancel.rest.png" Text="Cancel"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
